<div> 
<form method="post" action="{:U($module_name.'/ads_updateoradd')}" class="pageForm required-validate"  onsubmit="return iframeCallback(this);" enctype="multipart/form-data">
<table class="table" width="100%" hidden="100%" layoutH="110">
<tr>
	<td width="30%">广告标题:</td><td><input type="text" id="title" name="title" value="{$ads['title']}" errormsg="广告标题至少2个字符,最多18个字符！"/></td>
</tr>
<tr>
	<td>广告起始时间:</td><td><input type="text" name="starttime" value="{if $ads['starttime']}{$ads['starttime']|date="Y-m-s H:m:s",###}{/if}" placeholder="不填写则为时间不限制"/></td>
</tr>
<tr>
	<td>广告结束时间:</td><td><input type="text" name="endtime" value="{if $ads['endtime']}{$ads['endtime']|date="Y-m-s H:m:s",###}{/if}" placeholder="不填写则为时间不限制"/></td>
</tr>
<tr>
	<td>展现方式:</td>
	<td>
	<select id="type" name="type">
		<option value="1" {if $ads['type'] == 1} selected="selected" {/if}>图片</option>
		<option value="2" {if $ads['type'] == 2} selected="selected" {/if}>文字</option>
		<option value="3" {if $ads['type'] == 3} selected="selected" {/if}>flash</option>
		<option value="4" {if $ads['type'] == 4} selected="selected" {/if}>脚本</option>
	</select>
	</td>
</tr>
<tr>
	<td>广告结束时间:</td>
	<td>
	<select id="layout" name='layout'>
		<option value="index-left" {if $ads['layout'] == 'index-left'} selected="selected" {/if}>左侧广告</option>
		<option value="index-right" {if $ads['layout'] == 'index-right'} selected="selected" {/if}>右侧广告</option>
		<option value="index-banner2" {if $ads['layout'] == 'index-banner2'} selected="selected" {/if}>底部广告</option>
	</select>
	</td>
</tr>
<tr>
	<td>广告内容:</td>
	<td>三个任选一个<br/>
	<input type="file" name="file1" id="file1" value="{$ads['script']}" onchange="checkData(this)"/><br/>
	</td>
</tr>
<tr>
	<td>广告链接:</td>
	<td>
	<input type="text" name="url" id="url" value="{$ads['url']}" placeholder="http://" />
	</td>
</tr>
<tr>
	<td>排序:</td>
	<td>
	<input type="text" id="sequence" name="sequence" value="{$ads['sequence']}"/>
	</td>
</tr>
</table>
	<div class="form-actions">
    <input  type="hidden" name="id" id="id" value="{$id}">
    <input  type="hidden" name="layoutid" id="layoutid" value="{$ads['layoutid']}">
    <input type="hidden" id="user_id" value="{$user_id}" name="user_id">
    <input value="1" type="hidden" name="submit" type="hidden">
		<input type="submit" class="btn btn-primary" value="提交" style="width:50px;float:none;"/>&nbsp;&nbsp;&nbsp;
		<input type="reset" class="btn" value="重置" style="width:50px;float:none;"/>
	</div>
	</form>
</div>
